<!DOCTYPE html>
<html lang="{% if page.language == nil %}cnn{% else %}{{ page.language }}{% endif %}">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="google-site-verification" content="aexITLS38FdIRzwj25OVWxm87rpa9l-UV0URTyC9cTs" />
  <title>
    {{ page.title }}
    {% if page.category == 'blog' and page.url != '/blog/index.html' %}
    - Yong Yuan
    {% endif %}
  </title>
  <link rel="stylesheet" href="../css/site.css">
  <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  {% if page.description %}<meta name="description" content="{{page.description}}" />{% endif %}
  <!-- <link rel="alternate" type="application/atom+xml" title="RSS Feed for Devin's blog" href="/feed.xml" /> -->

  {% if page.url == '/index.html' %}
    <link rel="alternate" hreflang="ch" href="/cn/" />
  {% elsif page.url == '/cn/index.html' %}
    <link rel="alternate" hreflang="en" href="/" />
  {% endif %}

  {{ page.extra_head }}

  {% if page.category == 'blog' %}
    {% if page.photo %}
      <meta property="og:image" content="/imgs/posts/{{ page.photo }}" />
    {% endif %}
  {% endif %}
</head>
<body>
  <div class="header-container">
    <header class="inner">
      {% if page.url == '/cn/' %}
      <nav>
        <a class="{% if page.category == 'about-zh' %} selected {% endif %}" href="/cn/">关于</a>
        <a class="{% if page.category == 'project-zh' %} selected {% endif %}" href="/cn/project">项目</a>
        <a href="/YongYuan_resume.pdf">简历</a>
        <a class="{% if page.category == 'blog' %} selected {% endif %}" href="/blog/">博客</a>
        <a href="/books/">书单</a>
        <a href="/timeline/">时间线</a>
        <a href="https://github.com/devin-jade">Github</a>
      </nav>
      {% elsif page.url == '/cn/project' %}
      <nav>
        <a class="{% if page.category == 'about-zh' %} selected {% endif %}" href="/cn/">关于</a>
        <a class="{% if page.category == 'project-zh' %} selected {% endif %}" href="/cn/project">项目</a>
        <a href="/YongYuan_resume.pdf">简历</a>
        <a class="{% if page.category == 'blog' %} selected {% endif %}" href="/blog/">博客</a>
        <a href="/books/">书单</a>
        <a href="/timeline/">时间线</a>
        <a href="https://github.com/devin-jade">Github</a>
      </nav>
      {% else %}
      <nav>
        <a class="{% if page.category == 'about' %} selected {% endif %}" href="/">About</a>
        <a class="{% if page.category == 'project' %} selected {% endif %}" href="/project/">Project</a>
        <a href="/YongYuan_resume.pdf">Resume</a>
        <a class="{% if page.category == 'blog' %} selected {% endif %}" href="/blog/">Blog</a>
        <a href="/books/">Book</a>
        <a href="/timeline/">Times</a>
        <a href="https://github.com/devin-jade">Github</a>
      </nav>
    {% endif %}

      <div class="pull-right right logo">
        <a href="https://devin-jade.github.io/notes/"><img class="avatar" src="/imgs/yongyuan.png" alt="My profile picture" /></a>
      </div>
      <div class="clear"></div>
    </header>
    <div class="clear"></div>
  </div>

  {{ content }}
  <div class="separator"></div>

  <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-40867989-1']);
    _gaq.push(['_trackPageview']);

    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    /*!
     * http://github.com/ssaunier/track-outbound-links
     * Copyright 2013 Sébastien Saunier
     * @license MIT
     */
    !function(e,t){function n(){for(var n=t.getElementsByTagName("a"),a=[],r=0;r<n.length;++r){var o=n[r];o.host!=e.location.host&&a.push(o)}return a}function a(n){for(var a=n.srcElement||n.target;a&&("undefined"==typeof a.tagName||"a"!=a.tagName.toLowerCase()||!a.href);)a=a.parentNode;a&&a.href&&(e._gaq&&_gaq.push(["_trackEvent","Outbound link","Click",a.href]),(!a.target||a.target.match(/^_(self|parent|top)$/i))&&(setTimeout(function(){t.location.href=a.href},150),n.preventDefault?n.preventDefault():n.returnValue=!1))}e.addEventListener("load",function(){var e=n();for(var t in e)e[t].addEventListener("click",a)})}(window,document);
    var links = document.links;
    for (var i = 0, linksLength = links.length; i < linksLength; i++) {
       if (links[i].hostname != window.location.hostname) { links[i].target = '_blank'; }
    }

    /*
     * Detect if we are included in an iframe => move.
     */
    if (window.top !== window.self
        && !window.self.location.href.match(/headsha\.re/))
    {
      window.top.location.replace(window.self.location.href);
    }
  </script>

</body>
</html>
